﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PaymentRequest.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->
    <link rel="stylesheet" href="Assets/css/EditTableCell.css" type="text/css" />

    <script type='text/javascript' src="Assets/js/jquery-custom-1.0.0.js?v=2011"></script>

    <link rel="stylesheet" type="text/css" href="assets/css/datepicker.css" />

    <script type='text/javascript' src="assets/js/jquery.ui.datepicker.js"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#txtFrom").datepicker({ dateFormat: "dd-mm-yy" });
            $("#txtTo").datepicker({ dateFormat: "dd-mm-yy" });
            $("#btnExport").click(function() { 
                    openwindow();
                });
        });
        function getUrlVars() {
            var vars = {};
            var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
                vars[key] = value;
            });
            return vars;
        }
        function doDelete(ID, FileNumber) {
            if (confirm('Bạn thực sự muốn xóa ' + FileNumber + '?')) {
                var vnpage = getUrlVars()['page_number'];
                var strHref = "";
                if (vnpage)
                    strHref = "PaymentRequest.aspx?action=delete&ID=" + ID + "&page_number=" + vnpage;
                else
                    strHref = "PaymentRequest.aspx?action=delete&ID=" + ID;
                window.location.href = strHref;
            }
        }
        function doEdit(strID,strFileNo){   
            var vnpage = getUrlVars()['page_number'];   
            if(vnpage)      
                url = "PaymentRequest.Edit.aspx?id=" + strID+ "&page_number=" + vnpage;            
            else
                url = "PaymentRequest.Edit.aspx?id=" + strID;        
            window.location.href=url;
            //var win=window.open(url, '_blank');
            //win.focus();
        }
         
    </script>

    <style type="text/css">
    .bottom td
        {
         font-weight:bold;
         text-align:right;
        }
        table.adminlist th,    
        table.adminlist td {
        padding: 7px !important;
        }    
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <h2>
                ĐỀ NGHỊ THANH TOÁN
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">
                    <div class="content-box-header">
                        Find:
                        <asp:TextBox ID="keyword" Text="" runat="server"></asp:TextBox>
                        By:
                        <asp:DropDownList ID="ddType" runat="server">
                            <asp:ListItem Text="File Number" Value="1"></asp:ListItem>
                            <asp:ListItem Text="Carrier" Value="2"></asp:ListItem>
                            <asp:ListItem Text="Customer" Value="3"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox ID="txtFrom" CssClass="calendar-icon" runat="server" value="From" onclick="if(this.value=='From'){this.value=''; this.style.color='#000'}"
                            onblur="if(this.value==''){this.value='From'; this.style.color='#555'}" Width="125px"></asp:TextBox>
                        <asp:TextBox ID="txtTo" CssClass="calendar-icon" runat="server" value="To" Width="125px"
                            onclick="if(this.value=='To'){this.value=''; this.style.color='#000'}" onblur="if(this.value==''){this.value='To'; this.style.color='#555'}"></asp:TextBox>
                        <asp:Button ID="btnSearch" Text="Search" runat="server" CssClass="button" Style="margin: 9px 10px;"
                            OnClick="btnSearch_Click" />
                        <input id="btnAddNew" type="button" style="float: right; margin: 9px 10px;" class="button"
                            value="Add new" onclick="window.location.href='PaymentRequest.Edit.aspx'" />
                        <div class="clear">
                        </div>
                    </div>
                    <asp:Repeater ID="rptData" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "DateCreate")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Status")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "SubjectType")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "BankName")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "PaymentSubject")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "AllFileNumber")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "SumTotal")%>
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "CreateByName")%>
                                </td>
                                <td>
                                    <asp:CheckBox ID="AccountingVerify" runat="server" Enabled="false" Checked='<%#Eval("AccountingVerify").ToString()=="1"?true:false %>' />
                                </td>
                                <td>
                                    <asp:CheckBox ID="Verify" runat="server" Enabled="false" Checked='<%#Eval("Verify").ToString()=="1"?true:false %>' />
                                </td>
                                <td>
                                    <asp:CheckBox ID="DirectorVerify" runat="server" Enabled="false" Checked='<%#Eval("DirectorVerify").ToString()=="1"?true:false %>' />
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist"
                                editcellcontent="true">
                                <thead>
                                    <tr style="background: #ECECEC;">
                                        <th align="center" class="thheader" width="30px">
                                            Index
                                        </th>
                                        <th align="center" class="thheader">
                                            Ngày tháng
                                        </th>
                                        <th align="center" class="thheader">
                                            Trạng thái
                                        </th>
                                        <th align="center" class="thheader">
                                            Loại hình TT
                                        </th>
                                        <th align="center" class="thheader">
                                            HTTT
                                        </th>
                                        <th align="center" class="thheader">
                                            Đối tượng
                                        </th>
                                        <th align="center" class="thheader">
                                            Số file
                                        </th>
                                        <th align="center" class="thheader">
                                            Số tiền
                                        </th>
                                        <th align="center" class="thheader">
                                            Người lập
                                        </th>
                                        <th align="center" class="thheader">
                                            Kế toán
                                        </th>
                                        <th align="center" class="thheader">
                                            Người duyệt
                                        </th>
                                        <th align="center" class="thheader">
                                            Giám đốc
                                        </th>
                                        <th align="center" class="thheader">
                                            Chức năng
                                        </th>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            <tr class="bottom">
                            </tr>
                            </TABLE>
                        </FooterTemplate>
                    </asp:Repeater>
                    <div class="clear">
                    </div>
                    <div id="footer">
                        <%=strPager%>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
